Skip to content

Conversation

smuppand
Copy link
Contributor

This PR updates only the IPA and RMNET testcases (and the shared helpers they use) to be platform-agnostic and CI friendly.

What changed

IPA (Runner/suites/Kernel/Baseport/IPA/run.sh)

Gate on CONFIG_QCOM_IPA with check_kernel_config (no more broken-pipe spam).

Load ipa only if not already loaded; unload only if we loaded it.

/dev/ipa presence checked with wait_for_path; absence leads to SKIP, not FAIL.

Uses scan_dmesg_errors "ipa" … "handshake_complete.*error" "IPA Q6 handshake completed" to:

Warn on error patterns.

Log PASS when the success line appears.

Cleaner logging and final .res output strictly IPA PASS|FAIL|SKIP.

RMNET (Runner/suites/Kernel/Baseport/RMNET/run.sh)

Gate on CONFIG_RMNET.

Load/unload rmnet symmetrically (respect preloaded state).

/dev/rmnet* checked; if missing, WARN only (common when no data call yet).

dmesg scanned for rmnet errors via scan_dmesg_errors "rmnet" "." "panic|oops|fault"; logs issues without hard failing unless desired.

Optional ip link info printed, but never fails the test if interfaces aren’t up.

Shared helpers (functestlib.sh)

scan_dmesg_errors(label, out_dir, extra_err, ok_kw)

Logs both error and success patterns.

Return codes: 0=errors seen, 1=no errors, 2=no OK match, 3=misuse.

check_kernel_config() now uses zgrep when available; gzip fallback removed the “Broken pipe” noise.

@smuppand smuppand requested review from abbajaj806 and vnarapar July 22, 2025 15:02
…, node checks)

- Gate both tests on kernel configs (CONFIG_QCOM_IPA / CONFIG_RMNET); skip
  cleanly when unsupported.
- Use existing helpers (check_kernel_config, find_kernel_module,
  load_kernel_module, unload_kernel_module, is_module_loaded) instead of
  ad-hoc insmod/rmmod logic.
- Track whether modules were preloaded and only unload if the test loaded them.
  Fixes second-run failures caused by removing a module another test needs.
- Add wait_for_path-style check for /dev/ipa and /dev/rmnet* (short timeout),
  but treat 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:50:56:8e:7e:c2 brd ff:ff:ff:ff:ff:ff
    altname enp3s0
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether b6:8c:4f:19:b8:4c brd ff:ff:ff:ff:ff:ff rmnet visibility as informational (non-fatal).
- Improve logging: explicit PASS/WARN/FAIL lines for node presence and module
  state; keep .res minimal (just TESTNAME + result).

Signed-off-by: Srikanth Muppandam <[email protected]>
Copy link
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vnarapar vnarapar merged commit baf427a into qualcomm-linux:main Jul 30, 2025
7 checks passed
smuppand pushed a commit to smuppand/qcom-linux-testkit that referenced this pull request Aug 8, 2025
IPA & RMNET tests: robust module handling, /dev node checks, dmesg scan, ShellCheck fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants